*****************
*** Tab. B.7 ***
*****************

* load frame
frame change comparative_data


foreach outcome in main_out econ_worsen econ_will_worsen gov_econ_resp incumbent internal_efficacy ext_efficacy partisan trust_parliament{

reg `outcome' ///
	i.income_loss##i.declining##c.region_talk_pol ///
	i.class2 i.class3 ///
	i.not_working ///
	age ///
	i.edu2 i.edu3 i.edu4 i.edu5 ///
	i.gender ///
	i.cntryn ///
	, ///
		cluster(region_iso2)
eststo `outcome'

}

reg main_out ///
	i.income_loss##i.growth_three##c.region_talk_pol ///
	i.class2 i.class3 ///
	i.not_working ///
	age ///
	i.edu2 i.edu3 i.edu4 i.edu5 ///
	i.gender ///
	i.cntryn ///
	, ///
		cluster(region_iso2)
eststo main_out_terc


esttab ///
	main_out main_out_terc econ_worsen econ_will_worsen gov_econ_resp incumbent internal_efficacy ext_efficacy partisan trust_parliament ///
	using "$folder/replication/tables/tabB7.csv" ///
	, ///
		cells( ///
			b(fmt(3) star) ///
			se(par fmt(3)) ///
		) ///
		nodepv ///
		starlevel(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
		interaction("X") ///
		keep(1.income_loss ///
			region_talk_pol ///
			1.declining ///
			2.growth_three ///
			3.growth_three ///
			1.income_loss#c.region_talk_pol ///
			1.income_loss#1.declining ///
			1.income_loss#2.growth_three ///
			1.income_loss#3.growth_three ///
			1.declining#c.region_talk_pol ///
			2.growth_three#c.region_talk_pol ///
			3.growth_three#c.region_talk_pol ///
			1.income_loss#1.declining#c.region_talk_pol ///
			1.income_loss#2.growth_three#c.region_talk_pol ///
			1.income_loss#3.growth_three#c.region_talk_pol ///		
		) ///
		stats(N N_clust r2 df_m, ///
			fmt(0 0 2 0)) ///
		replace

